package top.superflow.utils

import org.apache.commons.lang3.StringUtils
import top.superflow.verify.Ensure

object ClasspathUtil extends Ensure{

  def retrieveRealPathFromClasspath(classpath : String) : String = {
    notNull(classpath, "The classpath should not be null")
    val realpathUnderClassPath = StringUtils.replace(classpath, "classpath:", "")
    getClass.getResource(realpathUnderClassPath).getFile
  }
}
